import java.io.DataInput;
import java.io.IOException;

public final class Cls_21 extends Cls_7
{

    public boolean fld_575;
    public byte fld_576[];
    public int fld_577[];
    public byte fld_578;
    public byte fld_579;
    public boolean fld_580;
    public int fld_581;
    public int fld_582;
    public int fld_583;
    public int fld_584;

    public Cls_21()
    {
        fld_582 = -1;
        fld_578 = fld_579 = 0;
    }

    public Cls_21(int i)
    {
        fld_582 = 1;
        fld_581 = -1;
    }

    public Cls_21(int i, int j)
    {
        fld_582 = 2;
        fld_581 = -1;
        fld_583 = -1;
        fld_584 = -1;
    }

    public Cls_21(int i, int j, int k)
    {
        fld_582 = 3;
        fld_584 = -1;
        fld_579 = fld_578 = 0;
    }

    public Cls_21(int i, byte byte0, boolean flag, byte byte1, int j)
    {
        fld_582 = 3;
        fld_584 = i;
        fld_579 = byte0;
        fld_580 = flag;
        fld_578 = byte1;
        fld_583 = j;
    }

    public final byte mth_68()
    {
        Cls_21 cls_21;
        if(fld_582 != 3)
        {
            if((cls_21 = this).fld_582 != 2)
                return ((byte)(cls_21.fld_582 == 1 ? 0 : 4));
            else
                return 1;
        } else
        {
            return 2;
        }
    }

    public final int mth_69()
    {
        Cls_21 cls_21;
        if(fld_582 != 3)
        {
            if((cls_21 = this).fld_582 != 2)
            {
                if(cls_21.fld_582 == 1);
                return -1;
            } else
            {
                return cls_21.fld_581;
            }
        } else
        {
            return fld_584;
        }
    }

    public final int mth_70(DataInput datainput, int i)
    {
        int k;
        int l;
        if(fld_582 != 3)
        {
            datainput = i;
            i = datainput;
            Cls_21 cls_21 = this;
            if(fld_582 != 2)
            {
                if((cls_21 = cls_21).fld_582 != 1)
                {
                    int j = i.readUnsignedByte();
                    cls_21.fld_578 = j & 7;
                    cls_21.fld_575 = ((k = j & 8) | -k) >>> 31 ^ 1;
                    cls_21.fld_579 = (j & 0x70) >> 4;
                    cls_21.fld_580 = ((l = j & 0x80) | -l) >>> 31 ^ 1;
                    cls_21.fld_581 = i.readInt();
                    j = i.readShort();
                    cls_21.fld_577 = new int[j];
                    cls_21.fld_577[0] = i.readInt() + datainput;
                    for(datainput = 1; datainput < j; datainput++)
                        cls_21.fld_577[datainput] = i.readInt() + cls_21.fld_577[datainput - 1];

                    return cls_21.fld_577[0];
                } else
                {
                    datainput = i;
                    i = cls_21;
                    cls_21.fld_581 = datainput.readInt();
                    i.fld_576 = new byte[4];
                    datainput.readFully(((Cls_21) (i)).fld_576);
                    return 0;
                }
            } else
            {
                (cls_21 = cls_21).fld_581 = i.readInt() + datainput;
                cls_21.fld_583 = i.readUnsignedShort();
                cls_21.fld_584 = i.readUnsignedShort();
                cls_21.fld_576 = new byte[cls_21.fld_583 <= cls_21.fld_584 ? cls_21.fld_584 : cls_21.fld_583];
                i.readFully(cls_21.fld_576);
                return cls_21.fld_581;
            }
        } else
        {
            datainput = i;
            i = datainput;
            Cls_21 cls_21_1 = this;
            fld_584 = i.readInt() + datainput;
            datainput = i.readUnsignedByte();
            cls_21_1.fld_579 = datainput & 7;
            int i1;
            cls_21_1.fld_580 = ((i1 = datainput & 8) | -i1) >>> 31 ^ 1;
            cls_21_1.fld_578 = (datainput & 0x70) >> 4;
            cls_21_1.fld_583 = i.readInt();
            return cls_21_1.fld_584;
        }
    }
}